/*
 * @file grab_ball_server.h
 * @brief	state for grabbing the ball.
 *
 * @author Michiel Hegemans
 * @author Peter Evers
 *
 * @date Jan 2013
 */

#include "servers/base_server.h"
#include "rp_states/GrabBallAction.h"

class GrabBallAction : public BaseServer {
private:
	actionlib::SimpleActionServer<rp_states::GrabBallAction> as_;

	double stop_distance_;

	rp_states::GrabBallFeedback feedback_;
	rp_states::GrabBallResult result_;
public:
	/**
	 * Constructor.
	 */
	GrabBallAction(std::string name);

	/**
	 * Destructor.
	 */
	~GrabBallAction();

	/**
	 * Execute the grab ball goal.
	 */
	void execute(const rp_states::GrabBallGoalConstPtr &goal);
};


